function fakeSubmittsSimulieren(){
	matchID = $("#fakeSubmittsMatchID").val();
	$("#fakeSubmittsResposne").html("");
	teamWonID = $("input[name='fakeSubmittsTeamWon']:checked").val();
	l(teamWonID);
	$.ajax({
		url : '../ajaxAdmin.php',
		type : "POST",
		dataType : 'json',
		data : {
			type : "fakeUser",
			mode : "fakeSubmittsSimulieren",
			ID: matchID,
			teamWon: teamWonID
		},
		success : function(result) {
			l(result);
			$("#DEBUG_AREA").html(result.debug);
			$("#fakeSubmittsResposne").html("Eingetragen!");
		}
	});
}

function resetSubmissions(){
	matchID = $("#fakeSubmittsMatchID").val();
	$("#resetSubmissionsResposne").html("");
	$.ajax({
		url : '../ajaxAdmin.php',
		type : "POST",
		dataType : 'json',
		data : {
			type : "fakeUser",
			mode : "resetSubmissions",
			ID: matchID
		},
		success : function(result) {
			l(result);
			$("#DEBUG_AREA").html(result.debug);
			$("#resetSubmissionsResposne").html("Einträge zurückgesetzt für MatchID: "+matchID+" ("+result.status+")");
		}
	});
}

function cronjobMatchResultsSubmit(){
$("#cronjobMatchResultsSubmitResponse").html("");
	
	$.ajax({
		url : '../ajaxAdmin.php',
		type : "POST",
		dataType : 'json',
		data : {
			type : "cronjobs",
			mode : "cronjobMatchResultsSubmit",
		},
		success : function(result) {
			l(result);
			$("#DEBUG_AREA").html(result);
			$("#cronjobMatchResultsSubmitResponse").html("Status: true");
		}
	});
}

function cronjobDoAllCronjobs(){
	$("#cronjobDoAllCronjobsResponse").html("");
		
		$.ajax({
			url : '../ajaxAdmin.php',
			type : "POST",
			dataType : 'json',
			data : {
				type : "cronjobs",
				mode : "cronjobDoAllCronjobs",
			},
			success : function(result) {
				l(result);
				$("#DEBUG_AREA").html(result);
				$("#cronjobDoAllCronjobsResponse").html("Status: true");
			}
		});
	}

function insertUserAdmin(){
	steamID = $("#insertUserSteamID").val();
	$("#insertUserSteamIDResposne").html("");
	$.ajax({
		url : '../ajaxAdmin.php',
		type : "POST",
		dataType : 'json',
		data : {
			type : "fakeUser",
			mode : "insertUser",
			ID: steamID
		},
		success : function(result) {
			l(result);
			$("#DEBUG_AREA").html(result.debug);
			$("#insertUserResposne").html("("+result.status+")");
		}
	});
}

function insertRandomUserinQueue(){
	$("#insertRandomUserinQueueResposne").html("");
	$.ajax({
		url : '../ajaxAdmin.php',
		type : "POST",
		dataType : 'json',
		data : {
			type : "fakeUser",
			mode : "insertRandomUserinQueue",
		},
		success : function(result) {
			l(result);
			$("#DEBUG_AREA").html(result.debug);
			$("#insertRandomUserinQueueResposne").html("("+result.status+")");
		}
	});
}

function submitAllMatchAccept(){
	$("#submitAllMatchAcceptResposne").html("");
	
	matchID = $("#submitAllMatchAcceptMatchID").val();
	
	$.ajax({
		url : '../ajaxAdmin.php',
		type : "POST",
		dataType : 'json',
		data : {
			type : "fakeUser",
			mode : "submitAllMatchAccept",
			ID: matchID
		},
		success : function(result) {
			l(result);
			$("#DEBUG_AREA").html(result.debug);
			$("#submitAllMatchAcceptResposne").html("("+result.status+")");
		}
	});
}

function insertTestMatches(){
$("#insertTestMatchesResponse").html("");
	
	$.ajax({
		url : '../ajaxAdmin.php',
		type : "POST",
		dataType : 'json',
		data : {
			type : "fakeMatches",
			mode : "insertRandomTestMatches"
		},
		success : function(result) {
			l(result);
			$("#DEBUG_AREA").html(result.debug);
			$("#insertTestMatchesResponse").html("("+result.status+")");
		}
	});
}

function insertNewMatchMode(){
$("#insertNewMatchModeResponse").html("");
	
	$.ajax({
		url : '../ajaxAdmin.php',
		type : "POST",
		dataType : 'json',
		data : {
			type : "matchMode",
			mode : "insertNewMatchMode"
		},
		success : function(result) {
			l(result);
			$("#DEBUG_AREA").html(result.debug);
			$("#insertTestMatchesResponse").html("("+result.status+")");
		}
	});
}
